<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
		<style>
			.red {color:red;}
			
			.blue {color:blue;}
			
			.active {letter-spacing: inherit;}
		</style>
	</head>
	<body>
		<p id="app1" v-bind:class="classlist">
			王子元真棒！
			<button v-on:click="clickbtn()">点我</button>
		</p>
		<script>
			var vue = new Vue({
				el:'#app1',
				data:{
					classlist:['red','active']
				},
				methods:{
					clickbtn(){
						this.classlist.forEach(function(item){
							console.log(item);
						})
					}
				}
			})
		</script>
	</body>
</html>
